<template>
 <div>
   <el-container>
     <el-aside width="200px" style="overflow: hidden">
       <el-row class="tac" style="width: 380px;margin-left: -20px">
         <el-col :span="12">
           <el-menu
               default-active="2"
               router
               class="el-menu-vertical-demo"
               @open="handleOpen"
               @close="handleClose"
               style="height: 732px">
             <el-menu-item :index="item.path" v-for="item in navigationBarList" :key="item.id"
                           style="float:left;margin-left: 20px">
               <i :class="item.css"></i>
               <span slot="title">{{item.name}}</span>
             </el-menu-item>

           </el-menu>
         </el-col>
       </el-row>
     </el-aside>
     <el-main>
       <router-view/>
     </el-main>
   </el-container>
 </div>
</template>

<script>
export default {
  name: "userCenter",
  data(){
    return {
      navigationBarList:[{
        code: '',
        fatherId: '',
        id: '',
        name: '',
        path: '',
        css: ''
      }]
    }
  },
  methods:{
    /*getMessage(){
      this.$axios.post("/api/userCenter/getUserCM").then(resp=>{

      })
    },*/
    //获取导航栏信息
    getNavigationBar(){
      this.$axios.post("/api/userCenter/getNavigationBarJ").then(resp=>{
        this.navigationBarList=resp.data.data
        //alert(resp.data.data[1].name)
        console.log(resp)
      })
    }
  },
  created() {
    //this.getMessage();
    this.getNavigationBar();
  }
}
</script>

<style scoped>
.el-main {
  background-color: #f1f2f6;
  color: #333;
  text-align: center;
  line-height: 40px;
}

</style>